package com.gomtel.smartdevice.ui.holder;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.clj.fastble.data.BleDevice;
import com.gomtel.smartdevice.R;
import com.gomtel.smartdevice.base.BasicHolder;
import com.gomtel.smartdevice.bean.BuleToothContent;
import com.gomtel.smartdevice.global.WatchApplication;
import com.gomtel.smartdevice.moudle.db.entity.BdDataInfo;

/**
 * Created by Administrator on 2018/5/26 0026.
 */

public class DeviceContentHolder extends BasicHolder<Object> {

    private Context context;
    private TextView device_name;
    private TextView mac_location;


    public DeviceContentHolder(Context context) {
        this.context = context;
    }

    @Override
    public View initHolderView() {
        View view = View.inflate(WatchApplication.getInstance(), R.layout.item_device, null);
        device_name = (TextView) view.findViewById(R.id.device_name);
        mac_location = (TextView) view.findViewById(R.id.mac_location);

        return view;
    }

    @Override
    public void bindData(Object data) {
        BleDevice buleToothContent = (BleDevice) data;
        device_name.setText(buleToothContent.getName());
        mac_location.setText(buleToothContent.getMac());
    }



}
